package study01;

public class PrintTest {

	public static int[][] print(int max) {
		int row = 2 * max - 1;
		int aaa=max;
		int col = 0;
		int i=0;
		int[][] all = new int[row][row];
		if (max >= 1) {
			while (col <= (2 * max - 1)) {
				for (i=col;i<row; i++) {

					all[i][col] = aaa;
					all[col][i] = aaa;
					all[row - 1][i] = aaa;
					all[i][row - 1] = aaa;

				}
				
				
                col++;
                aaa--;
                row=row-1;
			}
		}

		return all;

	}

	public static void main(String[] args) {

		int[][] x = print(9);
		for (int i = 0; i < x.length; i++) {

			for (int j = 0; j < x.length; j++) {

				// System.out.print("(" + i + "," + j + ")");

				System.out.print(x[i][j]);

			}

			System.out.println();

		}

	}

}